01.12.2012, 15:20
Hi.I start making command /frespawn.I need if player is rank 6 and if it is in TEAM_BALLAS to respawn this cars:
and here is the command:
pawn Код:
ballascars[0] = AddStaticVehicle(487,2492.16,2337.68,10.82,0,5,5); //62 Ballas - maverick
ballascars[1] = AddStaticVehicle(522,2513.53,2363.664,4.22,90.8875,5,5); //63 Ballas - NRG
ballascars[2] = AddStaticVehicle(579,2513.53,2372.72,4.21,90.9410,5,5); //64 Ballas - huntley1
ballascars[3] = AddStaticVehicle(560,2513.53,2377.27,4.21,90,5,5); //65 Ballas - sultan - sloji neon
ballascars[4] = AddStaticVehicle(567,2524.84,2372.72,4.21,270,5,5); //67 Ballas - savanna1
ballascars[5] = AddStaticVehicle(567,2524.84,2368.54,4.21,270,5,5); //68 Ballas - savanna2
ballascars[6] = AddStaticVehicle(541,2524.84,2381.26,4.21,270,5,5); // Bullet
ballascars[7] = AddStaticVehicle(411,2541.80,2372.67,4.21,90,5,5); // Infernus 2
pawn Код:
if(strcmp(cmd, "/frespawn", true) == 0)
{
if(IsPlayerConnected(playerid))
{
if(PlayerInfo[playerid][pRank] < 6)
{
SendClientMessage(playerid, COLOR_GRAD1, "Ти не си лидер!");
return 1;
}
else
{
for(new cars=0; cars<MAX_VEHICLES; cars++)
{
if(!VehicleOccupied(cars))
{
SetVehicleToRespawn(cars);
}
}
SendClientMessage(playerid,COLOR_RED, "Всички коли бяха respawn-ати!");
}
}
return 1;
}