15.11.2012, 21:59
The full start test code is:
If this helps...
Код:
if(strcmp(cmd, "/buyflying", true) == 0) { if(IsPlayerConnected(playerid)) { if(PlayerInfo[playerid][pPassport] == 0) return SendClientMessage(playerid, COLOR_GREY,"* You need a passport before having any license!!"); if(IsPlayerInRangeOfPoint(playerid, 3,1490.3195,1305.6976,1093.2964)) { if(PlayerInfo[playerid][pFlyLic] == 0) { if(GetPlayerMoney(playerid) < 10500) { SendClientMessage(playerid, COLOR_GREY, "You don't have enough money for a flying license"); return 1; } else { SendClientMessage(playerid, COLOR_LIGHTBLUE, "You have selected to take the flying test"); SafeGivePlayerMoney(playerid, - 10500); FlyingInfo[playerid][FlyingTest] = 1; SafeSetPlayerInterior(playerid, 0); SetPlayerVirtualWorld(playerid, drivingtest); SafeSetPlayerPos(playerid, -1452.036010, 28.835857, 13.490882) SetPlayerRaceCheckpoint(playerid,3,-1444.2026,53.7472,22.4049,-1133.9303,333.3353,59.9484,7.0); CP[playerid] = 400; OnPlayerUpdateEx(playerid); new y, m, d; new h,mi,s; getdate(y,m,d); gettime(h,mi,s); format(string,sizeof(string), "(%d/%d/%d)[%d:%d:%d] %s [CMD] -> /buyflying",d,m,y,h,mi,s,sendername); CommandLog(string); } } else { SendClientMessage(playerid, COLOR_LIGHTBLUE, " You already own a flying license"); return 1; } } } return 1; }