All pastes #735463 Raw Edit

Unnamed

public text v1 · immutable
·published 2007-10-13 17:23 UTC
rendered paste body
dcmd_s(playerid,params[])
{
	new tmp[256],tmp2[256],tmp3[256],Index; tmp = strtok(params,Index), tmp2 = strtok(params,Index), tmp3 = strtok(params,Index);
	new id = strval(tmp);
	new name = strval(tmp2);
	new vehicles;
	if (strlen(tmp) && strlen(tmp2)) {
	    if (pInfo[playerid][Admin] >= 2) {
	        new isset = dini_Isset("sl", tmp);
	    	if (!isset) {
	    		new Float:x,Float:y,Float:z,Float:ang;
	    		new ins[256];
				GetPlayerPos(playerid, x, y, z);
				GetPlayerFacingAngle(playerid, ang);
				if (strlen(tmp3)) { vehicles = 1; } else { vehicles = 1; }
				format(ins, 256, "%i %i %i %i %s %s", x, y, z, ang, name, vehicles);
				dini_Set("sl", id, ins);
				SendClientMessage(playerid, COLOR_CYAN, "[CP] New Saved Checkpoint was added, you can now go there by /l [ID]");
			}
		}
	}
	return 1;
}