08.01.2014, 00:20
pawn Код:
#include <a_samp>
new VehiCart,
bool:cart[MAX_PLAYERS];
public OnGameModeInit(){
VehiCart = AddStaticVehicleEx(509, 1805.5453, -1902.0564, 12.8976, 84.0000, -1, -1, 100);
return true;
}
public OnPlayerStateChange(playerid, newstate, oldstate){
if(GetPlayerState(playerid)==PLAYER_STATE_DRIVER){
new vehicleid = GetPlayerVehicleID(playerid);
if(vehicleid == VehiCart && cart[playerid] != false){
//TU FUNCION
}else{SendClientMessage(playerid, red, "No tienes el oficio de Cartero");}
}
return true;
}
https://sampwiki.blast.hk/wiki/OnPlayerStateChange