12.01.2015, 02:01
pawn Код:
dcmd_noconducir( playerid, params[])
{
new jugadorid;
new str[68], name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
format(str, sizeof(str), "%s NO PUEDE CONDUCIR", name);
SendClientMessageToAll(-1, str);
if(sscanf(params, "u", jugadorid)) return SendClientMessage(playerid, -1, "Error: el uso correcto es /noconducir (id)");
if(!IsPlayerConnected(jugadorid)) return SendClientMessage(playerid, -1, "Jugador no conectado");
RemovePlayerFromVehicle(jugadorid);
noconducir[jugadorid] = true;
return true;
}
public OnPlayerEnterVehicle(playerid, vehicleid, ispassenger) //entra a los vehiculos
{
if(!ispassenger)
{
if(noconducir[jugadorid] == true)
{
RemovePlayerFromVehicle(playerid);
new Float:x, Float:y, Float:z;
GetPlayerPos(playerid, x, y, z);
SetPlayerPos(playerid, x, y, z);
}
}
return true;
}