25.05.2010, 11:41
Hello,
What happends is... nothing, Pawno just crashes, the crash happends when I add the /removeroadblock command, the /roadblock command works fine.
Thanks for your help folks
What happends is... nothing, Pawno just crashes, the crash happends when I add the /removeroadblock command, the /roadblock command works fine.
Код:
new Roadblock; if(strcmp(cmd, "/roadblock", true) == 0) { if( Roadblock < 1 ) { if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2) { new Float:pX, Float:pY, Float:pZ, Float:pA; GetPlayerPos(playerid, pX, pY, pZ); GetPlayerFacingAngle(playerid, pA); Roadblock = CreateObject(981, pX, pY, pZ, 0.0, 0.0, pA); SendClientMessage(playerid, COLOR_LIGHTYELLOW, "Roadblock successfully deployed."); return 1; } else { SendClientMessage(playerid, COLOR_GREY, " You are not a part of a faction."); } } else { SendClientMessage(playerid, COLOR_GREY, " A roadblock has already been deployed."); } return 1; } if(strcmp(cmd, "/removeroadblock", true) == 0) { if(PlayerInfo[playerid][pMember] == 1 || PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 2 || PlayerInfo[playerid][pLeader] == 2) { if( Roadblock >= 1 ) { DestroyObject( Roadblock ); Roadblock = 0; } else { SendClientMessage(playerid, COLOR_GREY, " No roadblocks have been deployed."); } } else { SendClientMessage(playerid, COLOR_GREY, " You are not a part of a faction."); } } return 1; }
![Wink](images/smilies/wink.png)