07.12.2010, 00:24
I want it so that when a player spawns a certain class, it send them a message based on that class. I tried this.
It errors like this.
C:\Users\ET183105\Desktop\New folder\ServerFinal\gamemodes\1.pwn(523) : error 025: function heading differs from prototype
It says the errors on line 523 and puclic OnPlayerSpawn(playerid,classid) is line 523. Plz help!
pawn Код:
public OnPlayerSpawn(playerid, classid)
{
AntiDeAMX();
SetPlayerInterior(playerid,0);
TogglePlayerClock(playerid,0);
if(classid == 1)
SendClientMessage(playerid,COLOR_YELLOW,"Type /work to being a mission!");
else if (classid == 2)
SendClientMessage(playerid,COLOR_YELLOW,"Type /work to being a mission!");
else if(classid == 3)
SendClientMessage(playerid,COLOR_YELLOW,"Type /work to being a mission!");
else if (classid == 4)
SendClientMessage(playerid,COLOR_YELLOW,"Type /work to being a mission!");
else if(classid == 5)
SendClientMessage(playerid,COLOR_YELLOW,"Type /work to being a mission!");
else if (classid == 6)
SendClientMessage(playerid,COLOR_YELLOW,"Type /work to being a mission!");
else if(classid == 7)
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Make sure everyone obeys all traffic laws!");
else if (classid == 8)
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Make sure everyone obeys all traffic laws!");
else if(classid == 9)
SendClientMessage(playerid,COLOR_LIGHTBLUE,"Make sure everyone obeys all traffic laws!");
else if (classid == 10)
SendClientMessage(playerid,COLOR_RED,"Help people who are in /distress!");
else if(classid == 11)
SendClientMessage(playerid,COLOR_RED,"Help people who are in /distress!");
else if (classid == 12)
SendClientMessage(playerid,COLOR_RED,"Help people who are in /distress!");
else if(classid == 13)
SendClientMessage(playerid,COLOR_GREEN,"Dispatch trucks and keep everyone om schedule!");
else if (classid == 14)
SendClientMessage(playerid,COLOR_GREEN,"Dispatch trucks and keep everyone om schedule!");
else if(classid == 15)
SendClientMessage(playerid,COLOR_YELLOW,"Type /work to being a mission!");
return 1;
}
C:\Users\ET183105\Desktop\New folder\ServerFinal\gamemodes\1.pwn(523) : error 025: function heading differs from prototype
It says the errors on line 523 and puclic OnPlayerSpawn(playerid,classid) is line 523. Plz help!