Alles anzeigen
//Oben
new jetpack = 0;
//ocmd
ocmd:jetpack(playerid,params[])
{
if(jetpack = 0)
{
SetPlayerSpecialAction(playerid, 2);
SendClientMessage(playerid,COLOR_TADA,"Dein Jetpack!");
}
else
{
SetPlayerSpecialAction(playerid, 0);
SendClientMessage(playerid,COLOR_TADA,"Dein Jetpack ist weg!");
jetpack = 0;
}
return 1;
}
Da fehlt was^^
new jetpack[MAX_PLAYERS] = 0;
ocmd:jetpack(playerid,p[]){
#pragma unused params
if(jetpack[playerid]==0){
SetPlayerSpecialAction(playerid,2);
SendClientMessage(playerid,-1,"Hier dein Jetpack!");
jetpack[playerid]=1;
}
else if(jetpack[playerid]==1){
SetPlayerSpecialAction(playerid,0);
SendClientMessage(playerid,-1,"Dein Jetpack ist nun weg!");
jetpack[playerid]=0;
}
return 1;
}