SA-MP Forums Archive
What Is wrong In This Code - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: What Is wrong In This Code (/showthread.php?tid=609404)



What Is wrong In This Code - CarRamper - 12.06.2016

Код:
CMD:rob(playerid, params[])
   {
for(new i; i < sizeof(robberyPlaces); i++)
    {
    if(IsPlayerInRangeOfPoint(playerid, 7.0, robberyPlaces[i][0], robberyPlaces[i][1], robberyPlaces[i][2]))
    {
    if(GetPVarInt(playerid,"RobTime")>GetTickCount())return SendClientMessage(playerid,0xFF0000FF,"Please wait 5 minutes before rob again.");
	if(gTeam[playerid] == TEAM_COP) return SendClientMessage(playerid, red, "Cops can't do robberies!");
    if(PlayerInfo[playerid][pJailed] == 1) return SendClientMessage(playerid, red, "You cannot use this command in jail.");
    if(IsPlayerInAnyVehicle(playerid)) return SendClientMessage(playerid,red,"You can't start a robbery if you are in a vehicle!");
    if(IsRobbing[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You are already robbing this place.");
    if(IsBankRobbing[playerid] == 1) return SendClientMessage(playerid,0xFF0000FF,"You are already robbing this bank.");
    pRobTimerID[playerid] = SetTimerEx("pRobTimer", 1000, true, "i", playerid);
    pRobCount[playerid] = 31;
   	SetPVarInt(playerid,"RobTime",GetTickCount()+300000);
   	ApplyAnimation(playerid, "ROB_BANK", "CAT_Safe_Rob", 4.0, 1, 0, 0, 0, 0); // Rob

    }
    }
    return 1;
}
I have tried to put a animation when a player rob but animation don't work.i can't see any animation help me please


Re: What Is wrong In This Code - GTLS - 12.06.2016

Try this:
PHP код:
 ApplyAnimation(playerid"ROB_BANK""CAT_Safe_Rob"4.000001); // Rob 
https://sampwiki.blast.hk/wiki/ApplyAnimation

i guess force syncing with server will help you. try it and tell us if it works