Script problem, Help.
#1

Quote:

else if (strcmp("/reset", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid, 2032.0551,1343.7814,10.8203);
SendClientMessage(playerid, COLOR_WHITE, "Home sweet Home");
SetPlayerArmour(playerid, 0);
ResetPlayerWeapons(playerid);
}
}

If i typ /reset In-Game, it work's with all tings but it says after it ''Unknown Command'', It says it at several commands.

The first one is :
Quote:

if (strcmp("/schip", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid,1515.5581,-1611.4160,892.9904);
SendClientMessage(playerid, COLOR_YELLOW, "You have been teleported to Schip T-DM, Choose a side.");
GivePlayerWeapon(playerid, 24, 100);
GivePlayerWeapon(playerid, 30, 500);
GivePlayerWeapon(playerid, 34, 50);
SetPlayerArmour(playerid, 100);
GivePlayerWeapon(playerid, 29, 500);
SetPlayerHealth(playerid, 100);
}

This one works Perfect but it says too ''Unknown command'', And they can spam /schip and get free guns, How can i make it they can only can do one time /schip and if they exit the area they can do it again. If they are still in the DM Area they can't use commdands etc. Only if they use /reset... Help
Reply
#2

Код:
else if (strcmp("/reset", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid, 2032.0551,1343.7814,10.8203);
SendClientMessage(playerid, COLOR_WHITE, "Home sweet Home");
SetPlayerArmour(playerid, 0);
ResetPlayerWeapons(playerid);
return 1;
}
}  // what's up with this bracket??
Код:
if (strcmp("/schip", cmdtext, true, 10) == 0)
{
SetPlayerPos(playerid,1515.5581,-1611.4160,892.9904);
SendClientMessage(playerid, COLOR_YELLOW, "You have been teleported to Schip T-DM, Choose a side.");
ResetPlayerWeapons(playerid);
GivePlayerWeapon(playerid, 24, 100);
GivePlayerWeapon(playerid, 30, 500);
GivePlayerWeapon(playerid, 34, 50);
SetPlayerArmour(playerid, 100);
GivePlayerWeapon(playerid, 29, 500);
SetPlayerHealth(playerid, 100);
return 1;
}
try this?
edit: also try checking my tutorial, https://sampforum.blast.hk/showthread.php?tid=176688
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)