Script [help]
#1

hey i have this following script .. its a tad long lol

Код:
//top of script 

new robarray[2]={
  1.000000,
  2.000000
};



 if(!strcmp("/rob", cmdtext, true) && PlayerToPoint(10 ,playerid,robarray))
 {
 if(IfPlayerIsRobed[playerid] == 0)
  {
   GameTextForPlayer(playerid,"~y~You Are Now ~b~ Stealing ~y~ money",5000,5);
  SetTimerEx("RobbingStore",5000, 0, "i", playerid);
	new robbername[MAX_PLAYER_NAME];
	new string[48];
  GetPlayerName(playerid, robbername, sizeof(robbername));
  format(string, sizeof(string), "%s Hase Robed The Store", robbername);
  SetPlayerWantedLevel(playerid, 5);
  SendClientMessageToAll(COLOR_RED, string);
  IfPlayerIsRobed[playerid] = 1;
  IfStoreHaseBeenRobed[playerid] = 1;
  SetTimerEx("RobStoreWaitTimer", 60000, 0, "i", playerid);
}
else if(IfPlayerIsRobed[playerid] == 1)
{
SendClientMessage(playerid, COLOR_RED, "You Have Already Robed Plz Wait");
}
else if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
{
 SendClientMessage(playerid, COLOR_RED, "You Can Not Rob You Are A Cop");
}
else if(PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 2)
{
 SendClientMessage(playerid, COLOR_RED, "You Can Not Rob You Are A FBI Agent");
}
else if(PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 3)
{
 SendClientMessage(playerid, COLOR_RED, "You Can Not Rob You Are A Army Personal");
}
else if(IfStoreHaseBeenRobed[playerid] == 1)
SetTimerEx("StoreBeenRobedFix", 60000, 0, "i", playerid);
SendClientMessage(playerid, COLOR_RED, "This Store Hase Been Rob Recently");
IfPlayerIsRobed[playerid] = 1;
 return 1;
 }
ok i have the following problems..

when i make someone a leader they can still rob....

and it dont say anything when they are a leader so i can go /rob and it dont come up with you can not rob



EDIT: with the array i need help to i get this error


C:\Program Files\Rockstar Games\GTA San Andreas\samp sever\filterscripts\robbery.pwn(43) : error 035: argument type mismatch (argument 3)
Reply
#2

Use :

Код:
else if(IfPlayerIsRobed[playerid] == 1)
{
 return SendClientMessage(playerid, COLOR_RED, "You Have Already Robed Plz Wait");
}
else if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
{
 return SendClientMessage(playerid, COLOR_RED, "You Can Not Rob You Are A Cop");
}
else if(PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 2)
{
 return SendClientMessage(playerid, COLOR_RED, "You Can Not Rob You Are A FBI Agent");
}
else if(PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 3)
{
 return SendClientMessage(playerid, COLOR_RED, "You Can Not Rob You Are A Army Personal");
}
It may work
Reply
#3

Quote:
Originally Posted by RaFsTar
Use :

Код:
else if(IfPlayerIsRobed[playerid] == 1)
{
 return SendClientMessage(playerid, COLOR_RED, "You Have Already Robed Plz Wait");
}
else if(PlayerInfo[playerid][pLeader] == 1 || PlayerInfo[playerid][pMember] == 1)
{
 return SendClientMessage(playerid, COLOR_RED, "You Can Not Rob You Are A Cop");
}
else if(PlayerInfo[playerid][pLeader] == 2 || PlayerInfo[playerid][pMember] == 2)
{
 return SendClientMessage(playerid, COLOR_RED, "You Can Not Rob You Are A FBI Agent");
}
else if(PlayerInfo[playerid][pLeader] == 3 || PlayerInfo[playerid][pMember] == 3)
{
 return SendClientMessage(playerid, COLOR_RED, "You Can Not Rob You Are A Army Personal");
}
It may work
nope that dident work i am useing that pleader line from larp so i dont know if that makes a diffrence
Reply
#4

*bump*
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)