public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/SpawnM4", cmdtext, true, 10) == 0) { GivePlayerWeapon(playerid, 31, 10000); } return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/heal", cmdtext, true, 10) == 0) { SendPlayerHealth(playerid, 100); SendClientMessage(playerid, "You have been healed!"); return 1; } return 0; }
ERROR CODES:
: error 021: symbol already defined: "OnPlayerCommandText" : error 017: undefined symbol "SendPlayerHealth" : error 035: argument type mismatch (argument 2) |
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/SpawnM4", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid, 31, 10000);
}
if (strcmp("/heal", cmdtext, true, 10) == 0)
{
SendPlayerHealth(playerid, 100);
SendClientMessage(playerid, "You have been healed!");
return 1;
}
return false;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/SpawnM4", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid, 31, 10000);
return 1;
}
if (strcmp("/heal", cmdtext, true, 10) == 0)
{
SendPlayerHealth(playerid, 100);
SendClientMessage(playerid, "You have been healed!");
return 1;
}
return 0;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/SpawnM4", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid, 31, 10000);
return 1;
}
if (strcmp("/heal", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, -1, "You have been healed!");
return 1;
}
return 0;
}
public OnPlayerCommandText(playerid, cmdtext[])
{
if (strcmp("/SpawnM4", cmdtext, true, 10) == 0)
{
GivePlayerWeapon(playerid, 31, 10000);
}
if (strcmp("/heal", cmdtext, true, 10) == 0)
{
SetPlayerHealth(playerid, 100);
SendClientMessage(playerid, "You have been healed!");
return 1;
}
return false;
}