04.02.2014, 16:09
How To Use Random Checkpoint ? Player Go To 1 Of Random Checkpoints Give Money ?
This is Code :
This is Code :
Код:
public OnPlayerKeyStateChange(playerid, newkeys, oldkeys) { if (newkeys == KEY_WALK) { if(IsPlayerInRangeOfPoint(playerid, 3.0, 1230.6826,-807.1774,1084.0078)) { kakhJob[playerid] = 1; new name[MAX_PLAYER_NAME], string[120]; GetPlayerName(playerid, name, sizeof(name)); format(string, sizeof(string), "{00FFFF}[Shoghl] {ADD8E6}Is Robing.. Player : %s", name ); SendClientMessageToAll(COLOR_YELLOW, string); SetPlayerCheckpoint(playerid,-484.5330,-1480.2612,13.9457,10); SendClientMessage(playerid,COLOR_LIGHTBLUE,"[Shoghl] {FFFF00}NiCe!"); new rand,Float:X, Float:Y, Float:Z; rand = random(4); switch(rand) { case 0:{X = -488.9691;Y = -1454.4095;Z = 13.6985;} case 1:{X = -491.1559;Y = -1590.0781;Z = 6.0986;} case 2:{X = 2141.2703;Y = -1611.0664;Z = 13.8660;} case 3:{X = 1092.9705;Y = -1093.6687;Z = 25.5253;} } SetPlayerCheckpoint(playerid, X, Y, Z, 5.0); return 1; } } else { if(IsPlayerInRangeOfPoint(playerid, 3.0, 1230.6826,-807.1774,1084.0078)) SendClientMessage(playerid, COLOR_RED, "[Dozdi] {FFFF00}Use Alt For Rob!"); }