24.04.2015, 13:57
this my Script Kidnap
this my checkpoints random float
How i can make my float better to i will add money for kiddnaper and death for kidnapped
this i want adding it when player in the random checkpoints
PHP код:
CMD:kidnap(playerid, params[])
{
new targetid;
if(sscanf(params,"d",targetid)) return SendClientMessage(playerid, 0xFF0000FF, "USAGE: /kidnap [id]");
if(!IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid, 0xFF0000FF, "ERROR: You must be on vehicle!");
if(noexit[targetid] == 1) noexit[targetid] = 0;
noexit[targetid] = 1;
PutPlayerInVehicle(targetid, GetPlayerVehicleID(playerid), 1);
new rand = random(sizeof(Kidnapp));
SetPlayerPos(playerid, Kidnapp[rand][0], Kidnapp[rand][1], Kidnapp[rand][2]);
SendClientMessage(targetid, COLOR_RED, "You Can Out /Cutrope");
new String[128];
format(String, sizeof(String), "You kidnapped %s", pName(targetid));
GameTextForPlayer(playerid, String, 5000, 2);
//for Victim:
format(String, sizeof(String), "You kidnaped From %s", pName(playerid));
GameTextForPlayer(targetid, String, 5000, 2);
return 1;
}
PHP код:
new Float:Kidnapp[][3] =
{
{213.8458,1867.2299,13.1406},
{404.7588,2443.3687,16.5000},
{760.2078,381.6906,23.1719},
{-777.8541,1436.0165,13.7891}
};
PHP код:
SetPlayerHealth(targetid, 0);
GivePlayerMoney(playerid, 1000);
DisablePlayerCheckpoint(playerid);